package android.life.viewmodel;

import android.annotation.NonNull;
import ohos.aafwk.ability.AbilityPackage;

public class OhosViewModel extends ViewModel {
    private AbilityPackage mApplication;

    public OhosViewModel(@NonNull AbilityPackage application) {
        mApplication = application;
    }

    /**
     * Return the application.
     */
    @SuppressWarnings("TypeParameterUnusedInFormals")
    @NonNull
    public <T extends AbilityPackage> T getApplication() {
        //noinspection unchecked
        return (T) mApplication;
    }
}
